package com.xzzz.backend.bsms.server.rbac.sys.dict.name;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Component;

/**
 * jackson 拓展
 */
@Component
public class JacksonSerializerModifierExpand {

    public JacksonSerializerModifierExpand(ObjectMapper objectMapper, DictCache dictCache) {
        objectMapper.setSerializerFactory(objectMapper.getSerializerFactory()
                .withSerializerModifier(new DictNameSerializerModifier(dictCache)));
    }

}
